package com.zuihai.app.mvp.model.api.service;

import com.zuihai.app.mvp.model.entity.BaseJson;
import com.zuihai.app.mvp.model.entity.BaseJsonNoArray;
import com.zuihai.app.mvp.model.entity.HomeBanner;
import com.zuihai.app.mvp.model.entity.HomeItem;
import com.zuihai.app.mvp.model.entity.MyBaseModelResult;
import com.zuihai.app.mvp.model.entity.MyFootCollectCheckResult;
import com.zuihai.app.mvp.model.entity.VideoResult;

import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import rx.Observable;

/**
 * Created by Administrator on 2017/5/24 0024.
 */

public interface HomeService {
    /**
     * 发现秘密
     *
     * @param userId    用户ID
     * @param pageIndex
     * @return
     */
    @FormUrlEncoded
    @POST("TiaomuInq")
    Observable<BaseJson<HomeItem>> requestSecret(@Field("my_id") String userId,
                                                 @Field("page") int pageIndex,
                                                 @Field("type") String type);

    //视频列表
    @FormUrlEncoded
    @POST("TiaomuInq")
    Observable<BaseJson<VideoResult>> requestVideo(@Field("my_id") String userId,
                                                   @Field("page") int pageIndex);

    /**
     * 逛街
     *
     * @param userId    用户ID
     * @param pageIndex
     * @return
     */
    @FormUrlEncoded
    @POST("TiaomuInq")
    Observable<BaseJson<HomeItem>> requestShopping(@Field("type") String type, @Field("my_id") String userId,
                                                   @Field("page") int pageIndex);

    /**
     * 周边
     *
     * @param userId    用户ID
     * @param pageIndex
     * @return
     */
    @FormUrlEncoded
    @POST("TiaomuInq")
    Observable<BaseJson<HomeItem>> requestPeriphery(@Field("type") String type, @Field("my_id") String userId, @Field("page") int pageIndex);

    /**
     * 活动
     *
     * @param userId    用户ID
     * @param pageIndex
     * @return
     */
    @FormUrlEncoded
    @POST("TiaomuInq")
    Observable<BaseJson<HomeItem>> requestActivity(@Field("type") String type, @Field("my_id") String userId, @Field("page") int pageIndex);

    /**
     * 活动
     *
     * @param userId    用户ID
     * @param pageIndex
     * @return
     */
    @FormUrlEncoded
    @POST("TiaomuInq")
    Observable<BaseJson<HomeItem>> requestActical(@Field("type") String type, @Field("my_id") String userId, @Field("page") int pageIndex);


    //人物
    @FormUrlEncoded
    @POST("TiaomuInq")
    Observable<BaseJson<HomeItem>> requestPersion(@Field("type") String type, @Field("page") int pageIndex, @Field("my_id") String userId);

    //互助
    @FormUrlEncoded
    @POST("TiaomuInq")
    Observable<BaseJson<HomeItem>> requestHelp(@Field("type") String type, @Field("page") int pageIndex, @Field("my_id") String userId);


    @FormUrlEncoded
    @POST("TiaomuInq")
    Observable<BaseJson<HomeItem>> requestRecomment(@Field("fenlei_Tag") int tag, @Field("page") int pageIndex, @Field("my_id") String userId);

    @FormUrlEncoded
    @POST("TiaomuInq")
    Observable<BaseJson<HomeItem>> requestStory(@Field("page") int pageIndex,
                                                @Field("my_id") String userId,
                                                @Field("type") String type);


    @FormUrlEncoded
    @POST("TiaomuInq")
    Observable<BaseJson<HomeItem>> requestHeadlin(@Field("type") int tag,
                                                  @Field("page") int pageIndex,
                                                  @Field("my_id") String userId);

    @FormUrlEncoded
    @POST("ToutiaoInq")
    Observable<BaseJson<HomeItem>> requestDiary(@Field("type") int tag,
                                                @Field("page") int pageIndex, @Field("my_id") String userId);

    @FormUrlEncoded
    @POST("TiaomuInq")
    Observable<BaseJson<HomeItem>> requestHot(@Field("page") int pageIndex,
                                              @Field("my_id") String userId,
                                              @Field("type") String type);


    @FormUrlEncoded
    @POST("TiaomuInq")
    Observable<BaseJson<HomeItem>> requestPicture(
            @Field("page") int pageIndex,
            @Field("my_id") String userId,
            @Field("type") String type);

    @POST("GetBanner")
    Observable<BaseJson<HomeBanner>> requestBanner();

    //头条足迹
    @FormUrlEncoded
    @POST("Zuji_ToutiaoInq")
    Observable<BaseJson<MyBaseModelResult>> toutiaoFootprint(@Field("my_id") String myID,
                                                             @Field("page") int page);

    //头条足迹
    @FormUrlEncoded
    @POST("Zuji_QuchuInq")
    Observable<BaseJson<MyBaseModelResult>> quchuFootprint(@Field("my_id") String myID,
                                                           @Field("page") int page);

    //头条足迹
    @FormUrlEncoded
    @POST("Zuji_FaxianInq")
    Observable<BaseJson<MyBaseModelResult>> faxianFootprint(@Field("my_id") String myID,
                                                            @Field("page") int page);

    //头条足迹
    @FormUrlEncoded
    @POST("Zuji_CommodityInq")
    Observable<BaseJson<MyBaseModelResult>> commodityFootprint(@Field("my_id") String myID,
                                                               @Field("page") int page);


    //头条足迹
    @FormUrlEncoded
    @POST("Shoucang_ToutiaoInq")
    Observable<BaseJson<MyBaseModelResult>> toutiaoCollectFootprint(@Field("my_id") String myID,
                                                                    @Field("page") int page);

    //头条足迹
    @FormUrlEncoded
    @POST("Shoucang_QuchuInq")
    Observable<BaseJson<MyBaseModelResult>> quchuCollectFootprint(@Field("my_id") String myID,
                                                                  @Field("page") int page);

    //头条足迹
    @FormUrlEncoded
    @POST("Shoucang_FaxianInq")
    Observable<BaseJson<MyBaseModelResult>> faxianCollectFootprint(@Field("my_id") String myID,
                                                                   @Field("page") int page);

    //头条足迹
    @FormUrlEncoded
    @POST("Shoucang_CommodityInq")
    Observable<BaseJson<MyBaseModelResult>> commodityCollectFootprint(@Field("my_id") String myID,
                                                                      @Field("page") int page);

    //我的主页头条
    @FormUrlEncoded
    @POST("Zhuye_getToutiao")
    Observable<BaseJson<HomeItem>> myHomeHeadline(@Field("my_id") String myID,
                                                  @Field("page") int page,
                                                  @Field("yonghu_id") String userID);


    //足迹
    @FormUrlEncoded
    @POST("ZujiInq")
    Observable<BaseJson<MyFootCollectCheckResult>> requestFootprint(@Field("my_id") String myID,
                                                                    @Field("page") int page);

    //收藏
    @FormUrlEncoded
    @POST("ShoucangInq")
    Observable<BaseJson<MyFootCollectCheckResult>> requestCollect(@Field("my_id") String myID,
                                                                  @Field("page") int page);

    //个人主页收藏
    @FormUrlEncoded
    @POST("ShoucangInq")
    Observable<BaseJson<MyFootCollectCheckResult>> homepageCollect(@Field("my_id") String myID,
                                                                   @Field("page") int page,
                                                                   @Field("friend_id") String friendId);

    //删除收藏
    @FormUrlEncoded
    @POST("Delete_ShoucangInq")
    Observable<BaseJsonNoArray> deleteCollect(@Field("tiaomu_id") String tiaomu_id);

    //删除足迹
    @FormUrlEncoded
    @POST("Delete_ZujiInq")
    Observable<BaseJsonNoArray> deleteFootprint(@Field("tiaomu_id") String tiaomu_id);

    //搜索足迹
    @FormUrlEncoded
    @POST("Sousuo_zujiInq")
    Observable<BaseJson<MyFootCollectCheckResult>> searchFootprint(@Field("my_id") String myID,
                                                                   @Field("page") int page,
                                                                   @Field("field") String field);

    //搜索收藏
    @FormUrlEncoded
    @POST("Sousuo_shoucangInq")
    Observable<BaseJson<MyFootCollectCheckResult>> searchCollect(@Field("my_id") String myID,
                                                                 @Field("page") int page,
                                                                 @Field("field") String field);

    @FormUrlEncoded
    @POST("Faxian_TuijianInq")
    Observable<BaseJson<HomeItem>> requestFindRecomment(@Field("page") int pageIndex,
                                                        @Field("my_id") String userId);
}
